package org.crh.share.response.impl;

import lombok.Getter;
import lombok.Setter;

public class RuntimeResponse extends SimpleResponse {
    private volatile boolean rollback = false;

    @Setter
    private boolean forceFormat = false;

    @Getter
    @Setter
    private String LoggerOutPut;

    public RuntimeResponse() {
    }

    public RuntimeResponse(int status) {
        super(status);
    }

    public RuntimeResponse(int status, String title) {
        super(status, title);
    }

    public RuntimeResponse(int status, Object payload) {
        super(status);
        this.setPayload(payload);
    }

    public RuntimeResponse(int status, String title, Object payload) {
        super(status, title, payload);
    }

    public void rollback() {
        this.rollback = true;
    }

    public boolean shouldRollback() {
        return this.rollback;
    }
}